/* Minimal main program -- everything is loaded from the library */

#include "Python.h"
#include "errcode.h"
int
main(int argc, char **argv)
{
	/* 754 requires that FP exceptions run in "no stop" mode by default,
	 * and until C vendors implement C99's ways to control FP exceptions,
	 * Python requires non-stop mode.  Alas, some platforms enable FP
	 * exceptions by default.  Here we disable them.
	 */
	FILE *fp = stdin;
	PyCompilerFlags cf;
	int ret;
	cf.cf_flags = 0;
	Py_Initialize();
	for(;;)
	{
		ret = PyRun_InteractiveOneFlags(fp, "<stdin>", &cf);
		if (ret == E_EOF)
		{
			Py_Finalize();
			return 0;
		}
	}
}
